package chapter06;

/**
 * Created by V5470-I5 on 2016/3/24.
 */
public class Ocean {
    public static void main(String[] args){
        doSwim(new Human("梅西"));
        doSwim(new Submarine("黄色一号"));
        doSwim(new Airplane("空军零号"));
        doSwim(new FlyingFish("东海"));
    }
    static void doSwim(Swimmer swimmer){
        swimmer.swim();
    }
}
